<template>
  <el-dialog
    v-loading="loading"
    :visible.sync="dialog"
    :close-on-click-modal="false"
    title="详情"
    width="85%"
    @close="cancel"
  >
    <el-form :model="itemInfo" :inline="true" size="small" label-width="150px">
      <el-form-item label="Vendor Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.vendorNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="MagMediaType:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.magMediaType }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Vendor Name:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.vendorName }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Vendor Type:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.vendorType }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Address:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.address }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Province:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.province }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Mail Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.mailNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Week:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.week }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Interval:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.interval }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Lead Time:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.leadTime }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Vendor Status:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.vendorStatus }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Dpet Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.deptNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Dpet Status:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.deptStatus }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Fax Number:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.faxNumber }}</span>
        </div>
      </el-form-item>
      <el-form-item label="XREF VENDOR:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.xrefVendor }}</span>
        </div>
      </el-form-item>
      <el-form-item label="SHIP & BILL:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.shipBill }}</span>
        </div>
      </el-form-item>
      <el-form-item label="创建人:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.createdBy }}</span>
        </div>
      </el-form-item>
      <el-form-item label="创建时间:">
        <div style="width: 200px;">
          <span class="filter-item">{{ parseTime(itemInfo.createdTime) }}</span>
        </div>
      </el-form-item>
      <el-form-item label="最后更新人:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.updatedBy }}</span>
        </div>
      </el-form-item>
      <el-form-item label="最后更新时间:">
        <div style="width: 200px;">
          <span class="filter-item">{{ parseTime(itemInfo.updatedTime) }}</span>
        </div>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
import { parseTime } from '@/utils/index'
export default {
  props: {
    parent: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      dialog: false,
      itemInfo: {},
      loading: false,
      id: ''
    }
  },
  methods: {
    parseTime,
    cancel() {
      this.itemInfo = {}
      this.loading = false
      this.id = ''
      this.parent.toQuery()
    }
  }
}
</script>
<style lang="scss" scoped>
element.style {
  width: 156px;
}
</style>
